namespace LeadCRM.Migrations
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Migrations;
    using System.Linq;
    using LeadCRM.Entities;

    internal sealed class Configuration : DbMigrationsConfiguration<LeadCRM.Entities.LeadCRMContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = false;
        }

        protected override void Seed(LeadCRM.Entities.LeadCRMContext context)
        {
            //  This method will be called after migrating to the latest version.

            //  You can use the DbSet<T>.AddOrUpdate() helper extension method 
            //  to avoid creating duplicate seed data. E.g.
            //

            WebSecurity.Register("NitinJain", "12345678", "Nitin403@hotmail.com"
                , true, "Nitin", "Jain");
            

            context.Menu.AddOrUpdate(
                new Menu
                {
                    MenuName = "Home",
                    MenuURL = "/Home/Index"
                },
                new Menu
                {
                    MenuName = "Register",
                    MenuURL = "/Account/Register"
                }


                );

                //context.People.AddOrUpdate(
                //  p => p.FullName, 
                //  new Person { FullName = "Andrew Peters" },
                //  new Person { FullName = "Brice Lambson" },
                //  new Person { FullName = "Rowan Miller" }
                //);
            
        }
    }
}
